﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    namespace="Deepcode.QueryPatterns.Redux.Domain" assembly="Deepcode.QueryPatterns.Redux">

	<class name="Customer" table="Customer" schema="sales">

		<id name="Id">
			<column name="CustomerId" sql-type="int" not-null="true"/>
			<generator class="identity"/>
			
		</id>

		<property name="AccountNumber" column="AccountNumber"/>

		<bag name="Addresses">
			<key column="CustomerId"/>
			<one-to-many class="CustomerAddress"/>
		</bag>

		<bag name="Orders">
			<key column="CustomerId"/>
			<one-to-many class="Order"/>
		</bag>
	</class>

</hibernate-mapping>
